<?php

namespace app\common\model;

use think\Model;

class Teacher extends Model
{
    // 连接数据库名称
    //protected $connection = 'db2';
    // 表名
    protected $name = 'teacher';
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'created_at';
    protected $updateTime = false;

    public function getGenderTextAttr($value, $data)
    {
        return isset(User::$genderList[$data['gender']]) ? User::$genderList[$data['gender']] : '';
    }

}
